<?php

namespace app\admin\model\order;

use think\Model;


class TaskOrder extends Model
{
    // 表名
    protected $name = 'task_order';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';
    protected $deleteTime = false;

    // 追加属性
    protected $append = [

    ];
    
    /**
     * 获取订单信息
     * $task_id 任务ID
     * $user_id 用户ID
     * $order_id 订单ID
     */
    public function get_task_order_info($task_id = 0,$user_id = 0, $order_id = 0)
    {   
        $datas = self::where('task_id', $task_id)->where('user_id', $user_id)->where('id', $order_id)->find();
        return $datas;
    }


}
